# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=amiitool
pkgver=2
_pkgver=r2
pkgrel=1
pkgdesc="Reverse-engineered amiibo cryptography"
url="https://github.com/socram8888/amiitool"
arch="all"
license="MIT"
options="!check" # No test suite
makedepends="git mbedtls-dev" # git is used to pull head version
source="$pkgname-$_pkgver.tar.gz::https://github.com/socram8888/amiitool/archive/$_pkgver.tar.gz
	fix-mbedtls_include.patch
	"
builddir="$srcdir/$pkgname-$_pkgver"

build() {
	make prefix=/usr
}

package() {
	make prefix=/usr DESTDIR="$pkgdir" install
}

sha512sums="28087a022a88ca604f610dff6f49f19f4c273d7787401a3e1dd998243ba4ca3628adb58bf9ea20e8e6c77cc021bedfeda8b632e0a50efe752eec543f20ef33d6  amiitool-r2.tar.gz
50bc13ff736c65b05b402e3dc1c3e61242271e9d311f5a60169263e2dd6ca5765dee6b1cde963e3a76980deaf29ee1e65991b9028f9c58c3a6402d959015993e  fix-mbedtls_include.patch"
